package st.business.tepth.business.driverinfo;

import android.app.Dialog;
import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;

import st.business.tepth.R;
import st.business.tepth.debug.DataProvider;

/**
 * @author zhangyu
 * @date 2019/3/1
 */
public class DialogWorkDetailInfo extends Dialog {
    public DialogWorkDetailInfo(Context context) {
        super(context);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        View view = LayoutInflater.from(context).
                inflate(R.layout.dialog_work_detail_info, null);
        RecyclerView recyclerView = view.findViewById(R.id.recycler_view);
        view.findViewById(R.id.iv_close).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        recyclerView.setLayoutManager(new GridLayoutManager(context,1));
        recyclerView.setAdapter(new WorkDetailInfoAdapter(DataProvider.getWorkDetailInfoList()));
        setContentView(view);
    }

}
